package com.wufan.day07.java4;

/**
 * @author SongWufan
 * @date 2022/5/19 18:08
 */
public class AnimalTest {
    public void func(Animal animal) {
        animal.eat();
        animal.shout();
    }

    public static void main(String[] args) {
        AnimalTest animalTest = new AnimalTest();
        animalTest.func(new Dog());
        animalTest.func(new Cat());
    }
}


